<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/form-check.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/thickbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/thickbox-compressed.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jQuery.FormValidator.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jQuery.FormValidator.js"></script>
<script type="text/javascript">
	function CheckForm() {
		return $("#form1").FormValidate();
	}
	$(document).ready(function() {
		$("#form1").SetValidateSettings({});
		$("#name").SetValidateSettings({
			FormValidate: {
				Empty: {
					Value: true,
					Message: "班级名称不能为空"
				}
			},
			Message: {
				Text: {
					Success: "",
					Error: "必须输入班级名称！"
				},
				MessageSpaceHolderID: "TipTitle"
			}
		});
	});
</script>
<script type="text/javascript">
   window.onload = function(){
      var oFCKeditor = new FCKeditor( 'summary' ) ;
      oFCKeditor.BasePath = "<?php echo $this->baseUrl ?>/public/fckeditor/";
 	  oFCKeditor.Width="800";
 	  oFCKeditor.Height="400";
      oFCKeditor.ReplaceTextarea() ;
    }
	function fnOnSubmit(form){
    	var oEditor = FCKeditorAPI.GetInstance('summary');
    	oEditor.UpdateLinkedField();
	}  
</script>
<script type="text/javascript">	
	$(function(){
		  $('#start_time').daterangepicker({
				closeOnSelect:true, 
				dateFormat:'yy-m-d', 
				presets:{specificDate: '选择日期', dateRange: '时间范围'}, 
				presetRanges:[{text: '选择今天', dateStart: 'today', dateEnd: 'today'}],
				rangeSplitter: '--',
				datepickerOptions: {
					changeMonth: true, 
					changeYear: true, 
					monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], 
					yearRange:"-50:+50",
					dayNamesMin:["日","一","二","三","四","五","六"]
					}, 
				posX:$('#start_time').offset().left + 180,
				posY:$('#start_time').offset().top,
				earliestDate: Date.parse('-50years'),
				latestDate: Date.parse('+50years')
				});
		  $('#end_time').daterangepicker({
				closeOnSelect:true, 
				dateFormat:'yy-m-d', 
				presets:{specificDate: '选择日期', dateRange: '时间范围'}, 
				presetRanges:[{text: '选择今天', dateStart: 'today', dateEnd: 'today'}],
				rangeSplitter: '--',
				datepickerOptions: {
					changeMonth: true, 
					changeYear: true, 
					monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], 
					yearRange:"-50:+50",
					dayNamesMin:["日","一","二","三","四","五","六"]
					}, 
				posX:$('#end_time').offset().left + 180,
				posY:$('#end_time').offset().top,
				earliestDate: Date.parse('-50years'),
				latestDate: Date.parse('+50years')
				});
	 });
</script>
</head>

<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
  <div class="third-menu">
    <?php echo $this->partial('common/operation.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>
  	<div class="menu-title"><span class="icon"></span>班级添加</div>
  </div>
  
  <div class="separate-line"></div>
	<div class="main-form">
	    <form name="form1" id="form1" method="post" action="<?php echo $this->baseUrl ?>/class/add">
	        <p>
	        	<label for="name">班级名称：</label>
	            <input name="name" id="name" type="text" class="input-text" />
	            <span id="TipTitle" class="Show"></span>
	        </p>
	        <p>
	        	<label for="start_time">开班日期：</label>
	            <input id="start_time" name="start_time" type="text" class="input-text" value="<?php echo date('Y-m-d', time()); ?>" />
	            <span id="TipStartTime" class="Show"></span>
	        </p>
	        <p>
	        	<label for="end_time">结束日期：</label>
	            <input id="end_time" name="end_time" type="text" class="input-text" />
	            <span id="TipEndTime" class="Show"></span>
	        </p>
	        <p><label for="location">毕业率：</label><input name="rate" type="text" class="input-text" /></p>
	        <p><label for="location">开班地点：</label><input name="location" type="text" class="input-text" /></p>
	        <p><label for="is_complete">是否完成：</label><select name="is_complete" class="input-text"><option value="0">未完成</option><option value="1">完成</option></select>
	        <p><label for="linkman">联系人：</label><input name="linkman" type="text" class="input-text" /></p>
	        <p>
	        	<label for="category">班级类型：</label>
	        	<select name="category" class="input-text" id="pid_select">
	            	<?php foreach ($this->conf->projectType as $key => $val): ?>
	                    <option value="<?php echo $key ?>"><?php echo $val; ?></option>
	                <?php endforeach; ?>
	            </select>
	        </p>
	        <p>
	        	<label for="income">班级收益：</label>
	            <input name="income" type="text" class="input-text" />
	        </p>
            <p>
            <label for="summary">班级简介：</label>（上传图片宽度请小于750px）
            </p>
	        <p>
            	<label for="summary">&nbsp;</label>
                <textarea name="summary" class="input-textarea" ></textarea>
            </p>
	        <p><label>&nbsp;</label><input type="submit" class="button" style="margin-left:0" value="提 交" /></p>
	    </form>
	</div>
	<!--div class="main-form">
	    <form action="<?php echo $this->baseUrl;?>/excel/upload" method="post" enctype="multipart/form-data" />
	        <input type="hidden" name="model" value="class" id="model" />
	        <p>	
	            <label>&nbsp;</label>
	            <input type="file" name="files" />
	            <input type="submit" class="button" value="批量上传" />
	        </p>
	    </form>
	</div-->
	<script type="text/javascript">
	$(document).ready(function(){
		$(".button").click(function(){
			var type = $(this).siblings("label").attr("class");
			$("#hover_type").val(type);
		});
	});
	</script>
	</div>

<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>